package com.example.demo.NiuKe.v05;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String i ;
        String s = "";
        while ((i = br.readLine())!=null){
            Integer c = Integer.valueOf(i);
            for (int j = 2;j<=c;j++){
                if(c % j ==0){
                    s = s+j+" ";
                    c= c/j;
                    j = 1;
                }
            }
            System.out.println(s);
        }
    }
}
